package Domain;

public class Cart {
    private int id;//购物车记录id
    private int cartid;//购物车id/用户id
    private int productid;//商品id
    private String picture;//图片
    private String name;//商品名
    private Double price;//商品单价
    private int cnum;//购物车商品数量
    private int num;//商品库存
    private Double totalprice;//总金额

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCartid() {
        return cartid;
    }

    public void setCartid(int cartid) {
        this.cartid = cartid;
    }

    public int getProductid() {
        return productid;
    }

    public void setProductid(int productid) {
        this.productid = productid;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public int getCnum() {
        return cnum;
    }

    public void setCnum(int cnum) {
        this.cnum = cnum;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public Double getTotalprice() {
        return totalprice;
    }

    public void setTotalprice(Double totalprice) {
        this.totalprice = totalprice;
    }

    @Override
    public String toString() {
        return "Cart{" +
                "id=" + id +
                ", cartid=" + cartid +
                ", productid=" + productid +
                ", picture='" + picture + '\'' +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", cnum=" + cnum +
                ", num=" + num +
                ", totalprice=" + totalprice +
                '}';
    }
}
